document.getElementById('loginForm').addEventListener('submit', function(event) {
    event.preventDefault();

    const username = document.getElementById('username').value;
    const password = document.getElementById('password').value;

]
    if (username === "admin" && password === "123456") {

        localStorage.setItem('username', username);

        window.location.href = 'dashboard.html';
    } else {
        alert('用户名或密码错误，请重试！');
    }
});